home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / Buch / Obuttn1x.h < prev    next >
C/C++ Source or Header  |  1999-01-22  |  2KB  |  49 lines

  1. //---------------------------------------------------------------------------
  2. #ifndef ObuttonH
  3. #define ObuttonH
  4. //---------------------------------------------------------------------------
  5. #include <vcl\SysUtils.hpp>
  6. #include <vcl\Controls.hpp>
  7. #include <vcl\Classes.hpp>
  8. #include <vcl\Forms.hpp>
  9. #include <vcl\ExtCtrls.hpp>
  10. //---------------------------------------------------------------------------
  11. class TOButton : public TCustomControl
  12. {
  13. private:
  14.   bool Pressed;
  15.   bool MButton;
  16.   bool Changed;
  17.   TColor Color;
  18.   void __fastcall SetColor(TColor OBrush, TColor OPen);
  19. protected:
  20.   virtual void __fastcall Paint(void);
  21.   virtual void __fastcall MouseDown
  22.     (TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
  23.   virtual void __fastcall MouseUp
  24.     (TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
  25.   virtual void __fastcall MouseMove (TShiftState Shift, int X, int Y);
  26. public:
  27.   void __fastcall SetSize (TRect Rechteck);
  28.   __fastcall TOButton(TComponent* Owner);
  29.   __fastcall TOButton(TComponent* Owner, TColor Farbe);
  30.   __fastcall TOButton(TComponent* Owner, TRect Rechteck);
  31. __published:
  32.   __property OnClick;
  33.   __property OnDblClick;
  34.   __property OnMouseDown;
  35.   __property OnMouseUp;
  36.   __property OnMouseMove;
  37.   __property OnStartDrag;
  38.   __property OnEndDrag;
  39.   __property OnDragDrop;
  40.   __property OnDragOver;
  41.   __property OnEnter;
  42.   __property OnExit;
  43.   __property OnKeyPress;
  44.   __property OnKeyDown;
  45.   __property OnKeyUp;
  46. };
  47. //---------------------------------------------------------------------------
  48. #endif
  49.